Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract GCEPD pv tests #40885

Merged
merged 1 commit into from
Mar 28, 2017

Conversation

copejon
Copy link
Contributor

@copejon copejon commented Feb 2, 2017

What this PR does / why we need it:
This is strictly a refactor moving the GCEPD suite in Persistent Volumes E2E to it's own file. This will make future provider specific additions to pv testing much more organized and readable. It will also enable a smoother transition to providers moving out of tree by consolidating related tests.

NONE

@k8s-ci-robot
Copy link
Contributor

Hi @copejon. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with @k8s-bot ok to test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 2, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@copejon
Copy link
Contributor Author

copejon commented Feb 2, 2017

cc @jeffvance

@copejon copejon changed the title Extracted GCEPD pv tests Extract GCEPD pv tests Feb 2, 2017
@k8s-github-robot k8s-github-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. labels Feb 2, 2017
@@ -72,6 +71,19 @@ func completeMultiTest(f *framework.Framework, c clientset.Interface, ns string,
deletePVCandValidatePVGroup(c, ns, pvols, claims)
}

// Delete the nfs-server pod.
func nfsServerPodCleanup(c clientset.Interface, config VolumeTestConfig) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it better to move this to pvutil.go?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see below

@@ -62,19 +62,6 @@ type persistentVolumeConfig struct {
namePrefix string
}

// Delete the nfs-server pod. Only done once per KubeDescription().
func nfsServerPodCleanup(c clientset.Interface, config VolumeTestConfig) {
Copy link
Contributor

@jeffvance jeffvance Feb 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why move this func? Seems that any other provider that wants to run nfs to test their storage will want this func,

Copy link
Contributor Author

@copejon copejon Feb 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it's written now, NFS has been an abstract way to provide a hostPath volume. Provider specific tests (e.g. GCE) define PVs that use the vendor's PersistentVolumeSource (like GCEPersistentDiskVolumeSource). So I was thinking that it's only relevant to our NFS & disruptive suite.

Copy link
Contributor

@jeffvance jeffvance Feb 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Today I see nfsServerPodCleanup called from these 2 files:
. test/e2e/persistent_volumes.go
. test/e2e/persistent_volumes-disruptive.go
and defined in pvutil.go.
So, since it is called by 2 pv related files, I still don't understand why it should not remain in pvutil.go...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, given that, I think you're right. Will move back to pvutil

@madhusudancs
Copy link
Contributor

I am not the right person to review this.

cc @kubernetes/sig-storage-pr-reviews

@madhusudancs madhusudancs removed their assignment Feb 2, 2017
@@ -0,0 +1,138 @@
/*
Copyright 2015 The Kubernetes Authors.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2017


// Testing configurations of single a PV/PVC pair attached to a GCE PD
var _ = framework.KubeDescribe("PersistentVolumes:GCEPD", func() {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line

@spxtr spxtr assigned jeffvance and rootfs and unassigned spxtr Feb 2, 2017
@jeffvance
Copy link
Contributor

It lgtm...

@@ -84,9 +96,6 @@ var _ = framework.KubeDescribe("PersistentVolumes [Volume][Serial]", func() {
ns = f.Namespace.Name
})

///////////////////////////////////////////////////////////////////////
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep these lines

@@ -62,19 +62,6 @@ type persistentVolumeConfig struct {
namePrefix string
}

// Delete the nfs-server pod. Only done once per KubeDescription().
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep nfs functions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See below re: provider segregation.

As the primary persistent_volumes.go file will exclusively test against an NFS volume, it made more sense to keep NFS util code with those tests.

@rootfs
Copy link
Contributor

rootfs commented Feb 3, 2017

@copejon can you share more thought why extracting gce from persistent volumes and the works going forward depending on this refactoring? As none of other e2e test files are specific to a single cloudprovider, they share core functions among supported cloud.

@copejon
Copy link
Contributor Author

copejon commented Feb 3, 2017

@rootfs This refactor is an attempt to preempt a situation where test suites for different providers are all clumped together in one file with the goal of improving structure and readability. We're beginning to see more tests coming in for PVs that are provider specific. GCE is already singled out; vSphere is now seeing targeted PV testing with #40756.

Secondly, having each provider test and accompanying utility code in their own file will help to smooth transition as vendors move out of tree.

@rootfs
Copy link
Contributor

rootfs commented Feb 3, 2017

SGTM, please rebase

@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 3, 2017
pv, pvc := createPVPVC(c, pvConfig, ns, isPrebound)
waitOnPVandPVC(c, ns, pv, pvc)
// Delete the nfs-server pod.
func nfsServerPodCleanup(c clientset.Interface, config VolumeTestConfig) {
Copy link
Contributor

@jeffvance jeffvance Feb 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any callers of this func, so it should be deleted unless I missed one...

@jeffvance
Copy link
Contributor

/approve

@copejon
Copy link
Contributor Author

copejon commented Feb 23, 2017

@k8s-bot test this

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 23, 2017
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 23, 2017
@mikedanese
Copy link
Member

/approve

@k8s-github-robot k8s-github-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Feb 23, 2017
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 27, 2017
@copejon
Copy link
Contributor Author

copejon commented Feb 27, 2017

@k8s-bot bazel test this

@kerneltime
Copy link

cc @divyenpatel

@jeffvance
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 2, 2017
@copejon
Copy link
Contributor Author

copejon commented Mar 13, 2017

@k8s-bot cvm gce e2e test this

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 23, 2017
@k8s-github-robot k8s-github-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Mar 28, 2017
@jeffvance
Copy link
Contributor

@k8s-bot verify test this

@jeffvance
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 28, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: copejon, jeffvance, mikedanese

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit b890d31 into kubernetes:master Mar 28, 2017
@copejon copejon deleted the refactor-gce-pv-tests branch April 12, 2017 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants